package com.objectproject.main.service.subsystem.loader;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.objectproject.main.dao.MyPropertyDAOImpl;
import com.objectproject.main.dao.MyPropertyHierarchyDAOImpl;
import com.objectproject.main.model.MyObject;
import com.objectproject.main.model.MyProperty;
import com.objectproject.main.service.subsystem.MyObjectHierarchyResolver;

@Service
public class PropertyLoader {
	
	@Autowired
	MyPropertyDAOImpl myPropertyDAOImpl;
	
	@Autowired
	MyObjectHierarchyResolver myObjectHierarchyResolver;
	
	@Autowired
	MyPropertyHierarchyDAOImpl myPropertyHierarchyDAOImpl;
	
	//semantic overriding version properties retriever method
	
	public void loadHierarchicalFullPropertiesWithOverriding(MyObject myObject){
		
		//오버라이딩 메커니즘 포함
		ArrayList<MyProperty> myPropertiesWithOverriding = myPropertyHierarchyDAOImpl.semanticSelectFullPropertiesWithOverriding(myObject.getObjectId());
		myObject.setMyProperties(myPropertiesWithOverriding);
		
	}
	
	//semantic version
	
	public void loadCurrentProperties(MyObject myObject){
		//오버라이딩 메커니즘 포함
		
	}
	
	public void loadHierarchicalFullProperties(MyObject myObject){
		
		//오버라이딩 메커니즘 포함
		ArrayList<MyProperty> myProperties = myPropertyHierarchyDAOImpl.selectFullProperties(myObject.getObjectId());
		myObject.setMyProperties(myProperties);
		
	}

	public void loadHierarchicalViewMiniProperties(MyObject myObject){
		//오버라이딩 메커니즘 포함
		
	}
	
	public void loadHierarchicalViewSimpleProperties(MyObject myObject){
		//오버라이딩 메커니즘 포함
		
	}
	
	public void loadHierarchicalViewCardProperties(MyObject myObject){
		//오버라이딩 메커니즘 포함
		
	}
	
	
	public void loadHierarchicalViewNormalProperties(MyObject myObject){
		//오버라이딩 메커니즘 포함
		
	}
	
	
}
